import java.util.Scanner;
class animals{
    private int age;
    private String name ;

    public void info() {
        System.out.println(name + "今年" + age + "岁了。");
    }
    public void setAge(int age) {
        this.age = age;
    }
    public void setName(String name) {
        this.name = name;
    }
}
public class java23 {
    public static void main(String[] args)
    {
        animals animals = new animals();
        Scanner in =new Scanner(System.in);
        int x=5;
        while(x-- > 0){
            System.out.print("请输入动物的名字:");
            animals.setName(in.nextLine());
            System.out.print("请输入动物的年龄:");
            animals.setAge(in.nextInt());
            in.nextLine();
            animals.info();
        }
    }
}
